package mt.client;

import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;

public class EndPanel extends JPanel{
/**
 * The end panel has been designed to provide the customer with the last order 
 * received by the server. 
 * @author group 55
 */

	/**
	 * Lable responsible for showing the attributes of the last order received
	 */
	public JLabel lastOrderReceived;
	/**
	 * Lable responsible for showing when the order was received
	 */
	public JLabel orderReceivedTimestamp;

	/**
	 * 
	 * @param lastOrderReceived       responsible for showing the attributes of the last order received
	 * @param orderReceivedTimestamp  responsible for showing when the order was received
	 *
	 */
	public EndPanel(){
		lastOrderReceived = new JLabel("Last order received: ");
		orderReceivedTimestamp = new JLabel ("No Orders Received");
		config();
	}

	/**
	 * procedure responsible for the layout configuration 
	 */
	private void config() {
		setLayout(new GridLayout(1,2));
		add(lastOrderReceived);
		add(orderReceivedTimestamp);
	}

	public JLabel getLastOrderReceived() {
		return lastOrderReceived;
	}

	public JLabel getOrderReceivedTimestamp() {
		return orderReceivedTimestamp;
	}

}
